<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>sysmonpsu: xsysmonpsu_polled_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">sysmonpsu
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xsysmonpsu__polled__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xsysmonpsu_polled_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a design example using the driver functions of the System Monitor driver. </p>
<p>The example here shows the driver/device in polled mode to check the on-chip temperature and voltages.</p>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>This examples also assumes that there is a STDIO device in the system.</p>
<pre></pre><pre>MODIFICATION HISTORY:</pre><pre>Ver   Who    Date     Changes
</p>
<hr/>
<p>
1.0   kvn    12/15/15 First release
      ms     04/05/17 Modified Comment lines in functions to
                      recognize it as documentation block for doxygen
                      generation.
2.3   ms    12/12/17 Added peripheral test support.
      mn    03/08/18 Update code to run at higher frequency and remove sleep
2.6   aad   11/21/19 Removed reading of AUX channels
      aad   11/22/19 Added support for XSYSMON_PL
2.9   cog    07/20/23 Added support for SDT flow
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ae53b4649b4f9335a87072df7e5e579c4"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsysmonpsu__polled__example_8c.html#ae53b4649b4f9335a87072df7e5e579c4">SysMonPsuPolledPrintfExample</a> (u32 SysMonDeviceId)</td></tr>
<tr class="memdesc:ae53b4649b4f9335a87072df7e5e579c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function runs a test on the System Monitor device using the driver APIs.  <a href="#ae53b4649b4f9335a87072df7e5e579c4">More...</a><br/></td></tr>
<tr class="separator:ae53b4649b4f9335a87072df7e5e579c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xsysmonpsu__polled__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Main function that invokes the polled example in this file.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Main function that invokes the polled example in this file. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the example has completed successfully.</li>
<li>XST_FAILURE if the example has failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xsysmonpsu__polled__example_8c.html#ae53b4649b4f9335a87072df7e5e579c4">SysMonPsuPolledPrintfExample()</a>.</p>

</div>
</div>
<a class="anchor" id="ae53b4649b4f9335a87072df7e5e579c4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SysMonPsuPolledPrintfExample </td>
          <td>(</td>
          <td class="paramtype">u32&#160;</td>
          <td class="paramname"><em>SysMonDeviceId</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function runs a test on the System Monitor device using the driver APIs. </p>
<p>This function does the following tasks:</p>
<ul>
<li>Initiate the System Monitor device driver instance</li>
<li>Run self-test on the device</li>
<li>Setup the sequence registers to continuously monitor on-chip temperature, Supply 1 and Supply 3</li>
<li>Setup configuration registers to start the sequence</li>
<li>Read the latest on-chip temperature, Supply 1 and Supply 3</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">SysMonDeviceId</td><td>is the XPAR_&lt;SYSMON_instance&gt;_DEVICE_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>XST_SUCCESS if the example has completed successfully.</li>
<li>XST_FAILURE if the example has failed.</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None </dd></dl>

<p>References <a class="el" href="struct_x_sys_mon_psu___config.html#a0166b8968529950a2b997038b7d99f16">XSysMonPsu_Config::BaseAddress</a>, <a class="el" href="xsysmonpsu_8h.html#a7cd77d90e7456614726390476f3636c8">XSM_AVG_16_SAMPLES</a>, <a class="el" href="xsysmonpsu_8h.html#a0b564ae32085a3fc51c452d1babe46db">XSM_CH_SUPPLY1</a>, <a class="el" href="xsysmonpsu_8h.html#a7c4df26dc69ef41921c484fd3ccc006c">XSM_CH_SUPPLY3</a>, <a class="el" href="xsysmonpsu_8h.html#af2f79c54dddbdf090934f80f315b2e60">XSM_CH_TEMP</a>, <a class="el" href="xsysmonpsu_8h.html#a2ab1b4304d1e781bd7a9908718620c0b">XSM_MAX_SUPPLY1</a>, <a class="el" href="xsysmonpsu_8h.html#a4cc0e390c18e733d61a5bec32f8f806f">XSM_MAX_SUPPLY3</a>, <a class="el" href="xsysmonpsu_8h.html#a35d9814abedb2943f4a84ecff66351e5">XSM_MAX_TEMP</a>, <a class="el" href="xsysmonpsu_8h.html#acda48741be11b7a96ece33a3f67dbd74">XSM_MIN_SUPPLY1</a>, <a class="el" href="xsysmonpsu_8h.html#a4ae90b5125c90a5ecf98415c05e493a2">XSM_MIN_SUPPLY3</a>, <a class="el" href="xsysmonpsu_8h.html#af3acf3098ee563aa1cc3e35555d4e801">XSM_MIN_TEMP</a>, <a class="el" href="xsysmonpsu_8h.html#a090e870886f3ed8d58efc57c763772f2">XSM_SEQ_MODE_CONTINPASS</a>, <a class="el" href="xsysmonpsu_8h.html#a223c74befcd8a6710ea7a7acbaf41636">XSM_SEQ_MODE_SAFE</a>, <a class="el" href="xsysmonpsu_8c.html#a8cd0584410c0931f931aa4da1e3e151b">XSysMonPsu_CfgInitialize()</a>, <a class="el" href="xsysmonpsu_8c.html#a54eb6ba4c6f594b75d402cde03f6e173">XSysMonPsu_GetAdcData()</a>, <a class="el" href="xsysmonpsu_8c.html#aa4312c89ab0280cd7df2de940193fe32">XSysMonPsu_GetMinMaxMeasurement()</a>, <a class="el" href="xsysmonpsu_8h.html#a7c41996bf95cd7119dba302246345a9d">XSysMonPsu_IntrClear()</a>, <a class="el" href="xsysmonpsu_8h.html#a3ef44a74426b13480363747a5dedc5d0">XSysMonPsu_IntrGetStatus()</a>, <a class="el" href="xsysmonpsu_8h.html#a948f08280b6195869015382d92ba8a50">XSysMonPsu_LookupConfig()</a>, <a class="el" href="xsysmonpsu_8h.html#a380d87507652a19d453b20e6d7655d65">XSysMonPsu_RawToTemperature_OnChip</a>, <a class="el" href="xsysmonpsu_8h.html#af6667f0fcc65dda4a7af897b2924143c">XSysMonPsu_RawToVoltage</a>, <a class="el" href="xsysmonpsu_8h.html#a39d8d59cc35fe4151b51b5bbafdca2ca">XSysMonPsu_SelfTest()</a>, <a class="el" href="xsysmonpsu_8c.html#a3ce8ca01b6992994737213f342847662">XSysMonPsu_SetAlarmEnables()</a>, <a class="el" href="xsysmonpsu_8c.html#a711d9441ecb7c36f22b11f941d7f994b">XSysMonPsu_SetAvg()</a>, <a class="el" href="xsysmonpsu_8c.html#adb114566387fa8889b913f34a7de6010">XSysMonPsu_SetSeqAvgEnables()</a>, <a class="el" href="xsysmonpsu_8c.html#ac51295c525a507a8f334c97f02a84221">XSysMonPsu_SetSeqChEnables()</a>, and <a class="el" href="xsysmonpsu_8c.html#aa4bdb4e555b2c8d47a0185862c9cb4c6">XSysMonPsu_SetSequencerMode()</a>.</p>

<p>Referenced by <a class="el" href="xsysmonpsu__polled__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
